:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Clear the Golang environment.
:: 
:: Author: ZHANGQ
:: Create Time: 2020-08-05
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

@ECHO OFF

IF DEFINED PATH_BEFORE_GO (
    SET GOROOT=
    ECHO Remove environment variables 'GOROOT'.
    SET GOPATH=
    ECHO Remove environment variables 'GOPATH'.
    SET GO111MODULE=
    ECHO Remove environment variables 'GO111MODULE'.
    SET GOPROXY=
    ECHO Remove environment variables 'GOPROXY'.
    SET GOSUMDB=
    ECHO Remove environment variables 'GOSUMDB'.
    
    SET PATH=%PATH_BEFORE_GO%
    SET PATH_BEFORE_GO=
    ECHO Recover environment variables 'PATH' from go language environment.
)

IF DEFINED PROMPT_BEFORE_GO (
    SET PROMPT="%PROMPT_BEFORE_GO%"
    SET PROMPT_BEFORE_GO=
    ECHO Recover environment variables 'PROMPT' from go language environment.
)
